using System.Text;
using XSystem.Security.Cryptography;

namespace Reg
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string uq = tb_key.Text;
            string gval = uq.Substring(0, 19) + uq + uq.Substring(23);
            tb_fromkey.Text = Sign(gval);
        }

        static string Sign(string s)
        {
            var md5 = new MD5CryptoServiceProvider();
            string t2 = BitConverter.ToString(md5.ComputeHash(Encoding.Default.GetBytes(s)));
            t2 = t2.Replace("-", "").ToLower();
            return t2;
        }
    }
}